package com.jim.springjim.controller;

import org.jim.server.service.IDefultJIMSendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("jim")
public class JIMController {

    @Autowired
    IDefultJIMSendService sendService;

    @GetMapping("test")
    public boolean sendMsg(String id,String type,String msg){
        if("1".equals(type)){
            return sendService.sendToGroupBySys(id,msg);
        }else {
            return sendService.sendToUserBySys(id,msg);
        }
    }
}
